<template>
    <div @click="whichButton">
      <indexHeader v-if="!$route.meta.isPhone" :searchValue.sync="searchValues"></indexHeader>
      <div class="content">
        <keep-alive>
          <router-view v-if="$route.meta.keepAlive">
            <!-- 这里是会被缓存的视图组件 -->
          </router-view>
        </keep-alive>

        <router-view v-if="!$route.meta.keepAlive">
          <!-- 这里是不被缓存的视图组件 -->
        </router-view>
      </div>
      
      <!-- 意见弹窗 -->
      <popup-window v-if="!$route.meta.isPhone"></popup-window>
      <indexFooter v-if="!$route.meta.isPhone" @feedBackShow = 'feedBackShowFn'></indexFooter>
    </div>
</template>

<script>
import indexHeader from "basic/header/header"
import indexFooter from "basic/footer/foot"
import popupWindow from "basic/start/popupWindow" // 意见弹窗
import dom from "plus/dom"

export default {
  components: {
    indexHeader,
    indexFooter,
    popupWindow
  },
  data() {
    return {
      feedBackShowBool: false,
      searchValues:true
    }
  },
  name: "index",
  mounted() {
    document.querySelector('.content').style.minHeight = dom.getHeight()
  },
  methods: {
    feedBackShowFn(bool) {
      this.feedBackShowBool = bool
    },
    whichButton(event) {
      this.searchValues = true
    }
  },
  watch:{
  }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  .content
    /*margin-top 64px*/

</style>
